//package com.mrzhou.rabbit.config;
//
//import com.mrzhou.core.config.CoreConfiguration;
//import com.mrzhou.core.tool.utils.SpringUtil;
//import org.elasticsearch.client.RestHighLevelClient;
//import org.springframework.boot.autoconfigure.AutoConfigureAfter;
//import org.springframework.context.ApplicationContext;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.annotation.Order;
//import org.springframework.core.convert.converter.Converter;
//import org.springframework.data.convert.Jsr310Converters;
//import org.springframework.data.convert.ReadingConverter;
//import org.springframework.data.convert.WritingConverter;
//import org.springframework.data.elasticsearch.annotations.Document;
//import org.springframework.data.elasticsearch.client.ClientConfiguration;
//import org.springframework.data.elasticsearch.client.RestClients;
//import org.springframework.data.elasticsearch.config.ElasticsearchConfigurationSupport;
//import org.springframework.data.elasticsearch.core.convert.ElasticsearchCustomConversions;
//
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * @author qiang.zhou
// *      参考博客： https://blog.csdn.net/qq_33302985/article/details/109059044
// */
//@Configuration
//@AutoConfigureAfter(CoreConfiguration.class)
//public class ElasticsearchConfiguration extends ElasticsearchConfigurationSupport {
//
//    @Override
//    @Bean
//    public ElasticsearchCustomConversions elasticsearchCustomConversions() {
//        List<Converter> converters= new ArrayList<>();
//        converters.add(LongToStringConverter.INSTANCE);
//        return new ElasticsearchCustomConversions(converters);
//    }
//
//    @ReadingConverter
//    @WritingConverter
//    enum LongToStringConverter implements Converter<Long, String> {
//        INSTANCE;
//        @Override
//        public String convert(Long value) {
//            return String.valueOf(value);
//        }
//    }
//
//
//
//}
